package com.zzwtec.interfaces.permission.services;

import java.util.List;
import org.springframework.cloud.client.ServiceInstance;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.zzwtec.interfaces.Page;
import com.zzwtec.interfaces.RequestObject;
import com.zzwtec.interfaces.ResultObject;
import com.zzwtec.interfaces.permission.dto.NewsInfoDto;
/**
 * @FeignClient需要指向接口实现者的应用名比如(com.zzwtec.basedata)
 * @author  草原狼
 * 
 * 2017年08月02日
 */
@FeignClient("com.zzwtec.permission")
@RequestMapping("NewsInfoService")
public interface NewsInfoService {

	/**
	 * 添加NewsInfo
	 * 
	 * @param bean
	 * @return 
	 */
	@RequestMapping(value = "addNewsInfo", method = RequestMethod.POST)
	public ResultObject<String> addNewsInfo(@RequestBody RequestObject<NewsInfoDto> request);

	/**
	 * 按id删除NewsInfo
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "removeNewsInfo", method = RequestMethod.POST)
	public ResultObject<Void> removeNewsInfo(@RequestBody RequestObject<String> id);

	/**
	 * 修改NewsInfo
	 * @param bean
	 * @return
	 */
	@RequestMapping(value = "modifyNewsInfo", method = RequestMethod.POST)
	public ResultObject<Void> modifyNewsInfo(@RequestBody RequestObject<NewsInfoDto> request);

	/**
	 * 查询所有NewsInfo
	 * 
	 * @return
	 */
	@RequestMapping(value = "queryAllNewsInfo", method = RequestMethod.POST)
	public ResultObject<List<NewsInfoDto>> queryAllNewsInfo(@RequestBody RequestObject<Void> request);

	/**
	 * 根据id查询NewsInfo
	 * 
	 * @param id
	 * @return
	 */
	@RequestMapping(value = "queryNewsInfoById", method = RequestMethod.POST)
	public ResultObject<NewsInfoDto> queryNewsInfoById(@RequestBody RequestObject<String> id);
	
	
	
	/**
     * 获取分页NewsInfo数据
     * @param page 分页数据
     * @return 区域分页数据
     */
	@RequestMapping(value = "queryNewsInfoByPage", method = RequestMethod.POST)
	public ResultObject<Page<NewsInfoDto>> queryNewsInfoByPage(@RequestBody RequestObject<Page<NewsInfoDto>> request);

	/**
	 * 本地服务实例的信息
	 * @return ServiceInstance
	 */
	@RequestMapping(value = "instance-info", method = RequestMethod.GET)
	public ServiceInstance showServiceInfo();
}
